package mi.payment.ui.other;

import android.os.Bundle;
import android.view.View;

import mi.payment.R;
import mi.payment.ui.admin.ParamsPrintActivity;
import mi.payment.ui.base.BaseInputAdminPwdActivity;

/**
 * Created by shz on 2017/9/20.
 * 终端参数打印检验管理员密码界面
 */

public class ParamsPrintAdminPwd extends BaseInputAdminPwdActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setAutoFinish(false);
        initData();
    }

    private void initData() {
        cardNumber.setVisibility(View.GONE);
        cardMoney.setVisibility(View.GONE);
        cardTime.setVisibility(View.GONE);
        cardProof.setVisibility(View.GONE);
        cardRefer.setVisibility(View.GONE);
        transactionType.setVisibility(View.GONE);
        ensureData.setVisibility(View.GONE);
        title.setTitleText(getString(R.string.parameters_print));
    }

//    @Override
//    public void onClick(View v) {
//        super.onClick(v);
//        switch (v.getId()) {
//            case R.id.tv_ok:
//                if (isPasswordRight()) {
//                    openActivity(ParamsPrintActivity.class);
//                    finish();
//                } else {
//                    passwordInputView.clearText();
//                    showToast(getString(R.string.password_wrong));
//                }
//                break;
//        }
//    }

    @Override
    public void clickListener() {
        super.clickListener();
        if (isPasswordRight()) {
            openActivity(ParamsPrintActivity.class);
            finish();
        } else {
            passwordInputView.clearText();
            showToast(getString(R.string.password_wrong));
        }
    }
}
